package com.qfmy.common.result;

import lombok.Getter;


/**
 * @author 清风明月
 * @Package com.qfmy.common.exception
 * @date 2025/10/30
 * @description 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    PARAM_ERROR(202, "参数不正确"),
    SERVICE_ERROR(203, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    ILLEGAL_REQUEST(205, "非法请求"),
    REPEAT_ADD(206, "请勿重复点赞"),
    REPEAT_CANCEL(207, "请勿重复取消点赞"),
    REWARD_ALREADY_EXIST(208,"你已经打赏过了,请勿重复打赏" ),

    APP_LOGIN_AUTH(501, "未登陆"),
    APP_LOGIN_PHONE_EMPTY(502, "手机号码为空"),
    APP_ACCOUNT_DISABLED_ERROR(503, "当前账号已被禁用,请联系管理员"),
    APP_WX_LOGIN_ERROR(504, "微信登入失败"),
    APP_LOGIN_PHONE_ERROR(505,"手机格式错误" ),
    APP_ILLEGAL_CONTENT(506,"你发表的评论包含敏感信息,请重新发表" ),
    NOVEL_SELF_EXIST(507,"你已经添加过此小说了" ),
    COMMENT_NOT_EXIST(508, "该评论已被删除"),
    USER_AUDIO_SELF_EXIST(509,"用户音频在书架中已经存在" ),
    APP_LOGIN_CODE_EXPIRED(510,"图形验证码已过期" ),
    APP_LOGIN_CODE_ERROR(511,"图形验证码错误" ),
    USER_SIGN_IN_ALREADY(512, "请勿重复签到"),

    TOKEN_EXPIRED(601, "token过期"),
    TOKEN_INVALID(602, "token非法");


    /**
     * 状态码
     */
    private final Integer code;

    /**
     * 状态信息
     */
    private final String message;

    /**
     * 构造器
     * @param code
     * @param message
     */
    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
